#define _CRT_SECURE_NO_WARNINGS 1
#include"SeqList.h"





void SeqTest1()
{
	SeqList s;

	SeqInit(&s);

	SeqPushBack(&s, 1);
	SeqPushBack(&s, 2);
	SeqPushBack(&s, 3);
	SeqPushBack(&s, 3);
	SeqPushBack(&s, 3);
	SeqPushBack(&s, 3);
	SeqPushBack(&s, 4);
	SeqPopBack(&s);
	SeqPopBack(&s);
	SeqPopBack(&s);


	SeqPrint(&s);

	SeqDestroy(&s);
}
void SeqTest2()
{
	SeqList s;
	SeqInit(&s);
	SeqPushFront(&s, 1);
	SeqPushFront(&s, 2);
	SeqPushFront(&s, 2);
	SeqPushFront(&s, 2);
	SeqPushFront(&s, 2);
	SeqPushFront(&s, 3);
	SeqPushFront(&s, 4);
	SeqPopFront(&s);
	SeqPopFront(&s);

	SeqPrint(&s);

	SeqDestroy(&s);
}

void SeqTest3()
{
	SeqList s;
	SeqInit(&s);
	SeqPushBack(&s, 1);
	SeqPushBack(&s, 2);
	SeqPushBack(&s, 3);
	SeqPushBack(&s, 4);

	int pos = SeqFind(&s, 3);
	if (pos != -1)
	{
		SeqInsert(&s, pos, -3);
		SeqErase(&s, pos);
	}

	SeqPrint(&s);

	SeqDestroy(&s);
}

int main()
{
	SeqTest1();
	SeqTest2();
	SeqTest3();
	return 0;
}